﻿namespace WMS6.BLL
{
    using System;
    using System.Collections.Generic;
    using WMS6.Common;
    using WMS6.DataEntity;
    using WMS6.IDAL;
    using WMS6.DALFactory;

    public class SysLoginLogBLL
    {
        private static readonly ICommonMethodDA commonMethod = DataAccess.CreateCommonMethod();
        private List<string> dataBaseID = new List<string>();
        private static readonly ISysLoginLogDA sysLoginLogDA = DataAccess.CreateSysLoginLogDA();

        public SysLoginLogBLL()
        {
            this.dataBaseID.Add(ConstUtils.CONST_GLOBAL_TABLE);
        }

        public void InsertSysLoginLogInfo(SysLoginLogInfo sysLoginLogInfo)
        {
            try
            {
                sysLoginLogInfo.UpdatedBy = sysLoginLogInfo.CreatedBy;
                sysLoginLogDA.InsertSysLoginLog(sysLoginLogInfo, this.dataBaseID[0]);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorHandler(ex, LogType.Error);
            }
        }
    }
}

